<template>
  <div class="common-head">
    <!-- 左半边 -->
    <div class="head-left">
      <!-- 面包屑导航 -->
      <el-breadcrumb-item>
      <i
      @click="CollapseAside" 
      :class="$store.state.base.navCollapae ? 'el-icon-s-fold' : 'el-icon-s-unfold'">
        </i>
        </el-breadcrumb-item>
      
      <el-breadcrumb separator="/">
        
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item v-if="$route.path !== '/home'">{{$route.name}}</el-breadcrumb-item>
      </el-breadcrumb>
      <!-- 面包屑导航 -->
    </div>
    <!-- 左半边 -->
  </div>
</template>
<script>
    export default {
      methods: {
        CollapseAside () {
          // console.log(111);
          console.log(this.$store);
          this.$store.commit('base/AsideCollapse')
        }
      }

    }
</script>

<style lang="scss" scoped>
.common-head{
  height: 100%;
  display: flex;
  justify-content: space-between;
  .head-left{
    display: flex;
    align-items: center;
    i{
      font-size: 20px;
      cursor: pointer;
    }
  }

}


</style>

